package com.wwwarehouse.resource_center.bean.defindeobjectstore;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * author ：minifly
 * date: 2017/10/25
 * time: 19:21
 * desc:
 */
public class DefinedObjectStoreBean implements Parcelable {


    /**
     * list : [{"countUnknowInventory":"0","defaultInventory":"1","inTheStock":"任意","inventoryDefinitionUkid":100,"inventoryProxy":"仓储服务商||运输服务商||供货商","name":"可售库存","outsideTheStock":"任意","ownerUkid":-1,"quality":"良品"}]
     * page : 1
     * size : 5
     * total : 1
     */

    private int            page;
    private int            size;
    private int            total;
    private List<ListBean> list;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Parcelable {
        /**
         * countUnknowInventory : 0
         * defaultInventory : 1
         * inTheStock : 任意
         * inventoryDefinitionUkid : 100
         * inventoryProxy : 仓储服务商||运输服务商||供货商
         * name : 可售库存
         * outsideTheStock : 任意
         * ownerUkid : -1
         * quality : 良品
         */

        private String countUnknowInventory;
        private String defaultInventory;
        private String inTheStock;
        private long   inventoryDefinitionUkid;
        private String inventoryProxy;
        private String name;
        private String outsideTheStock;
        private long   ownerUkid;
        private String quality;

        public String getCountUnknowInventory() {
            return countUnknowInventory;
        }

        public void setCountUnknowInventory(String countUnknowInventory) {
            this.countUnknowInventory = countUnknowInventory;
        }

        public String getDefaultInventory() {
            return defaultInventory;
        }

        public void setDefaultInventory(String defaultInventory) {
            this.defaultInventory = defaultInventory;
        }

        public String getInTheStock() {
            return inTheStock;
        }

        public void setInTheStock(String inTheStock) {
            this.inTheStock = inTheStock;
        }

        public long getInventoryDefinitionUkid() {
            return inventoryDefinitionUkid;
        }

        public void setInventoryDefinitionUkid(long inventoryDefinitionUkid) {
            this.inventoryDefinitionUkid = inventoryDefinitionUkid;
        }

        public String getInventoryProxy() {
            return inventoryProxy;
        }

        public void setInventoryProxy(String inventoryProxy) {
            this.inventoryProxy = inventoryProxy;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getOutsideTheStock() {
            return outsideTheStock;
        }

        public void setOutsideTheStock(String outsideTheStock) {
            this.outsideTheStock = outsideTheStock;
        }

        public long getOwnerUkid() {
            return ownerUkid;
        }

        public void setOwnerUkid(long ownerUkid) {
            this.ownerUkid = ownerUkid;
        }

        public String getQuality() {
            return quality;
        }

        public void setQuality(String quality) {
            this.quality = quality;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.countUnknowInventory);
            dest.writeString(this.defaultInventory);
            dest.writeString(this.inTheStock);
            dest.writeLong(this.inventoryDefinitionUkid);
            dest.writeString(this.inventoryProxy);
            dest.writeString(this.name);
            dest.writeString(this.outsideTheStock);
            dest.writeLong(this.ownerUkid);
            dest.writeString(this.quality);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.countUnknowInventory = in.readString();
            this.defaultInventory = in.readString();
            this.inTheStock = in.readString();
            this.inventoryDefinitionUkid = in.readLong();
            this.inventoryProxy = in.readString();
            this.name = in.readString();
            this.outsideTheStock = in.readString();
            this.ownerUkid = in.readLong();
            this.quality = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.page);
        dest.writeInt(this.size);
        dest.writeInt(this.total);
        dest.writeList(this.list);
    }

    public DefinedObjectStoreBean() {
    }

    protected DefinedObjectStoreBean(Parcel in) {
        this.page = in.readInt();
        this.size = in.readInt();
        this.total = in.readInt();
        this.list = new ArrayList<ListBean>();
        in.readList(this.list, ListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<DefinedObjectStoreBean> CREATOR = new Parcelable.Creator<DefinedObjectStoreBean>() {
        @Override
        public DefinedObjectStoreBean createFromParcel(Parcel source) {
            return new DefinedObjectStoreBean(source);
        }

        @Override
        public DefinedObjectStoreBean[] newArray(int size) {
            return new DefinedObjectStoreBean[size];
        }
    };
}
